import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/Student',
    name: 'Student',
    component: () => import('../views/StudentView.vue')
  },
  {
    path: '/Teacher',
    name: 'Teacher',
    component: () => import('../views/TeacherView.vue')
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/area',
    component: () => import('../views/AreaView.vue')
  },
  {
    path: '/address',
    component: () => import('../views/AddressListView.vue')
  },
  {
    path: '/goods',
    component: () => import('../views/GoodsListView.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
